What's all this about RS274X Anyway?Steve DiBartolomeoApplications Manager Artwork Conversion Software, Inc. © 1995 Artwork Conversion Software, Inc.
IntroductionIf you're a PCB designer you're probably hearing more and more about extended Gerber - RS274X. The latest versions of many PCB layout programs either offer RS274X as an option or only output RS274X-- such as Cadence's Allegro. Benefits of RS274X RS274X includes many high level commands and controls that let the creator of the Gerber data specify the photoplot very precisely - much more so than RS274D which entailed passing a lot of critical information separately from the data file. What is RS274X anyway?It is an extension to standard RS274D (commonly known as Gerber) that includes:
This document assumes that you are familiar with the basic Gerber commands - if not you may wish to first review the article Apertures, D-Codes and Plot Files which summarizes basic Gerber.
Some of the embedded information we mention here is actually available, although rarely used, in the RS274D specification. Where to Get the Official RS274X Spec?The RS274X specification was developed by Gerber Scientific. Gerber was purchased by Barco, then Barco by Mania, a Belgian company. The spec now resides with UCAMCO (formerly Barco ETS). The most recent Gerber specification is now available as a downloadable PDF: Gerber File Specification 2015.10 2.66 MB |
Embedding Format Info in the 274X HeaderRS274X includes a statement that embeds key information about the format, zero suppression and data mode into a single line:
where: L = leading zeros omitted T = trailing zeros omitted A = absolute coordinate mode I = incremental coordinate mode Xa = format of input data Yb = format of input data Examples%FSLAX24Y24*%Format Statement Leading Zeros Suppression, Absolute Coordinates format=2.4
%FSTIX44Y44*%Format Statement Trailing Zero Supression, Incremental Coordinates, format=4.4
Embedded Units
Standard Circle %ADD{code}C,{$1}X{$2}X{$3}*% where AD - aperture description parameter D{code} d-code to which this aperture is assigned (10-999) C tells 274X this is a circle macro $1 value (inches or mm) of the outside diameter $2 optional, if present defines the diameter of the hole $3 optional, if present the $2 and $3 represent the size of a rectangular hole. Circle Examples %ADD21C,.100*% (a) 0.10 diameter circle on d21 %ADD22C,.100X.050*% (b) 0.10 dia circle with 0.05 hole on d22. %ADD23C,.100X.050X.050*% (c) 0.10 dia circle with 0.05 square hole on d23. %ADD24C,.100X.050X.025*% (d) 0.10 dia circle with 0.05 x 0.025 rectangular hole on d24. Standard Rectangles %ADD{code}R,{$1}X{$2}X{$3}X{$4}*% where AD - aperture description parameter D{code} d-code to which this aperture is assigned (10-999) R tells 274X this is a rectangle macro $1 value (inches or mm) of rect's length in X $2 value if rect's height in Y $3 optional, if present defines the diameter of the hole $4 optional, if present the $2 and $3 represent the size of a rectangular hole. For details on the obround and polygon (which are rarely used) see Gerber Format Guide, Doc 0000-000-RM-00. |
Aperture MacrosThe more general aperture macro can be thought of as a type of programming language where one builds up a complex aperture definition from a series of simpler primitives. Macros are almost required for properly defining thermal reliefs - and since thermal reliefs are very important in power and ground planes we'll do a detailed example of macros using the thermal primitive. Macro Primitives Remember we said a macro is like a programming language - the complex aperture is built from one or more shapes called primitives. Available primitives include: Primitive Name Primitive Number Description and Parameter Number Circle (1) round Line Vector (2 or 20) rectangle defined by endpoints width and rotation. Square ends. Line Center (21) rect - defined by center and length, width and rotation. Square ends. Line-Lower Left (22) rect - defined by lower left coordinate, length, width and rotation. Outline (4) outlines an area defined by coordinate pairs. max vertice=50. Polygon (5) a regular polygon with 3-10 sides. defined by center, outer diameter and rotation. Moire (6) target defined by center, number of circles circle thickness, cross hair length, thickness and rotation. Thermal (7) thermal relief defined by outer diameter, inner diameter, crosshair thickness and rotation. Aperture Macro Example - Thermal Relief
The thermal relief is so important that it has its own primitive - even though it could be built from other primitives.
%AMTHERM100*7,0,0,0.100,0.050,0.025,0.0*% %ADD32THERM100*% assigns THERM100 to d-code 32 where AM - aperture macro THERM100 - name of the macro * - terminates name 7 - primitive 7, which is a thermal relief 0,0 - first two parms: x,y center 0.100 - third parm: outer diameter (solid black see (a) above) 0.050 - fourth parm: inner diameter (clear see (b) above) 0.025 - fifth parm: crosshair width (clear see (c) above) 0.0 - sixth parm: crosshair rotation (not used here)
|